package com.hsnn.medstgmini.base.dict.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.hsnn.medstgmini.model.Status;

/**
 * @category 企业注册类型
 * @author zhangj
 * @date   2015-06-09
 */
@Entity
@Table(name = "dic_comptype")
public class DicCompType implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = 1L;
	private String compRegId;
	private String compRegCode;
	private String compRegName;
	private String fatherId;
	private String remark;
	private short status;
	private Date updDatetime;
	private String updUser;
	private short sortId;
	
	private String fatherRemark;
	
	private String fatherCompRegCode;
	private String fatherCompRegName;
	
	private String statusName;

	// Constructors

	/** default constructor */
	public DicCompType() {
	}
	
//	public DicCompType(String compRegId, String compRegCode, String compRegName, 
//			String fatherCompRegCode, String fatherCompRegName, short status) {
//		this.compRegId = compRegId;
//		this.compRegCode = compRegCode;
//		this.compRegName = compRegName;
//		this.fatherCompRegCode = fatherCompRegCode;
//		this.fatherCompRegName = fatherCompRegName;
//		this.status =status;
//	}
	
	/** full constructor */
	public DicCompType(String compRegId, String compRegCode, String compRegName, 
			String fatherId, String remark, short status, Date updDatetime, String updUser, 
			short sortId, String fatherCompRegCode, String fatherCompRegName) {
		this.compRegId = compRegId;
		this.compRegCode = compRegCode;
		this.compRegName = compRegName;
		this.fatherId = fatherId;
		this.remark = remark;
		this.status = status;
		this.updDatetime = updDatetime;
		this.updUser = updUser;
		this.sortId = sortId;
		this.fatherCompRegCode = fatherCompRegCode;
		this.fatherCompRegName = fatherCompRegName;
	}

	// Property accessors
	@Id
	@Column(name = "comp_reg_id")
	public String getCompRegId() {
		return this.compRegId;
	}

	public void setCompRegId(String compRegId) {
		this.compRegId = compRegId;
	}

	@Column(name = "comp_reg_code")
	public String getCompRegCode() {
		return this.compRegCode;
	}

	public void setCompRegCode(String compRegCode) {
		this.compRegCode = compRegCode;
	}

	@Column(name = "comp_reg_name")
	public String getCompRegName() {
		return this.compRegName;
	}

	public void setCompRegName(String compRegName) {
		this.compRegName = compRegName;
	}

	@Column(name = "father_id")
	public String getFatherId() {
		return this.fatherId;
	}

	public void setFatherId(String fatherId) {
		this.fatherId = fatherId;
	}

	@Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "status")
	public short getStatus() {
		return this.status;
	}

	public void setStatus(short status) {
		this.status = status;
	}

	@Column(name = "upd_datetime")
	public Date getUpdDatetime() {
		return this.updDatetime;
	}

	public void setUpdDatetime(Date updDatetime) {
		this.updDatetime = updDatetime;
	}

	@Column(name = "upd_user")
	public String getUpdUser() {
		return this.updUser;
	}

	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}

	@Column(name = "sort_id")
	public short getSortId() {
		return this.sortId;
	}

	public void setSortId(short sortId) {
		this.sortId = sortId;
	}
	@Transient
	public String getFatherCompRegCode() {
		return fatherCompRegCode;
	}

	public void setFatherCompRegCode(String fatherCompRegCode) {
		this.fatherCompRegCode = fatherCompRegCode;
	}
	@Transient
	public String getFatherCompRegName() {
		return fatherCompRegName;
	}

	public void setFatherCompRegName(String fatherCompRegName) {
		this.fatherCompRegName = fatherCompRegName;
	}
	@Transient
	public String getStatusName() {
		statusName = Status.getName(status);
		return statusName;
	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}
	@Transient
	public String getFatherRemark() {
		return fatherRemark;
	}

	public void setFatherRemark(String fatherRemark) {
		this.fatherRemark = fatherRemark;
	}


}